<?php

namespace app\api\validate;

use think\Validate;

class Auth extends Validate
{

    /**
     * 验证规则
     */
    protected $rule = [
        'auth_name|权限名称' => 'require|max:100',
        'rule|权限规则' => 'require|max:100|unique:auth',
    ];
    /**
     * 场景
     */
    protected $scene = [
        'add'   =>  ['auth_name','rule'],
        'edit'  =>  ['auth_name'=>'require|max:100','rule'=>'require|max:100'],
    ];    
}
